<!--
/**************************************************
* @(#)orderinput.jsp
*
* Copyright (c) 2005 Hitrust Technology Inc.
* Developed by SDC, Hitrust.
* All Rights Reserved.
*
* Modify History:
*  v1.00, 2006/02/08, SimonyiPeng
*  1) first release
/**************************************************
-->
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="java.util.*"%>
<%@ include file="../../common.jsp" %>
<%@page import="system.LoginContext"%>
<html>
<head>
<title>申购单录入</title>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="<%=root%>/css/caigouxitong.css" type=text/css rel=stylesheet>
<SCRIPT language="JavaScript" src="<%=root%>/js/common.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/calendar2.js"></SCRIPT>
<SCRIPT language="JavaScript" src="<%=root%>/js/string.js"></SCRIPT>
</head>

<%
	
	boolean isChange = true;
	
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    String strSysDate = sdf.format(new Date(System.currentTimeMillis()));	 
	
    GSBalanceParamDAO dao = new GSBalanceParamDAO();
    GSBalanceParamBean tBean = new GSBalanceParamBean();
    tBean = dao.queryBalanceDate();
   
    String strEnd = tBean.getGs_balance_end_date();    
    int intEnd = 0;
    
    String strStart = tBean.getGs_balance_start_date();
    
    int intNowDay = Integer.parseInt(strSysDate.substring(8,10));
    
    int intMonthMax = DateUtil.getMaxMonthDay(strSysDate);
    
    if (strEnd.length()==1) strEnd = "0" + strEnd;
	
	if (tBean.getGs_balance_date_type().equals("1"))
	{
		strEnd = DateUtil.getMaxMonthDay(strSysDate) + "";
		strStart = "1";
	}
	
	intEnd = Integer.parseInt(strEnd);
	
	if (intEnd< intNowDay && intNowDay < intMonthMax)
	{
		isChange = true;
	}
	else
	{
		isChange = false;
	}	
	
	String strFinanceEndDate = strSysDate.substring(0,8) + strEnd;
	
	ArrayList bcList = (ArrayList)request.getAttribute("balancecategory");
	ArrayList ary = (ArrayList)request.getAttribute("wareHouse");
	
	//配送方式
	ArrayList deliverModeList = (ArrayList)request.getAttribute("deliverModeList");
	if (deliverModeList == null) deliverModeList = new ArrayList();
	
	//结算方式
	ArrayList balanceModeList = (ArrayList)request.getAttribute("balanceModeList");
	if (balanceModeList == null) balanceModeList = new ArrayList();
	
	//备注字段长度
	int memoLen = 800;

%>


<script language='javascript'>

	<%
		//如果点击"保存并新增"按钮，在此作出保存成功提示
		if(request.getAttribute("SUCCESSMSG") != null)
			out.print("alert('"+request.getAttribute("SUCCESSMSG")+"');");
	%>
	
	
	
	function resetrow(rownum){
		document.getElementById('manufactureid'+rownum).value="";
		document.getElementById('concentricityid'+rownum).value="";
		document.getElementById('manufacturename'+rownum).innerHTML="<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('ordercount'+rownum).value="";
		document.getElementById('deliverdate'+rownum).value="<%=DateUtil.getTomorrow()%>";
		
		document.getElementById('spec'+rownum).innerHTML = "<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('type'+rownum).innerHTML = "<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('brand'+rownum).innerHTML = "<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('quantunit'+rownum).innerHTML = "<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('period'+rownum).innerHTML = "<div align='center' class='txt_content'>&nbsp;</div>";
		document.getElementById('referenceprice'+rownum).innerHTML = "";

		document.getElementById("providerid"+rownum).options[0].selected = true;
		document.getElementById("mode"+rownum).value="";
        document.getElementById("balancemode"+rownum).innerText="";
        var length = document.getElementById("providerid"+rownum).length;
		for (size=1;size<length;size++)
		{
			eval("document.getElementById('providerid'+rownum).options["+(length-size)+"]=null;");
		}
		
		// add by Jackey start
		
		//默认值设置为根据分站		
		document.getElementById('delivertime'+rownum).value = "<%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "3" : "1"%>";
		
		//设置总价为0
		document.getElementById('moneybuffer'+rownum).value = "0";
		document.getElementById('money'+rownum).innerHTML = "";
		//计算总价合计
		totalMoney();
		// add by Jackey end		
	}
		
	function changeDeliverAddrByDept(){
		var dept=document.getElementById('deptid');
        var msg = document.getElementById('deliveraddr');
        if(dept.selectedIndex==0){
            msg.selectedIndex=0;
            document.getElementById('linkman_').value="";
            document.getElementById('linktel_').value="";
        }else{
            //刷新结算模式
            var obj=document.getElementsByName("concentricityid");
            var array=new Array();
            for(var a=0;a<obj.length;a++){
                if(obj[a].value==""){
                    array[a]="NO";
                }else{
                    array[a]=obj[a].value;
                }
            }
            selectyes(array);
        }
	}
	var request = false;
        function selectyes(val){
        var dept=document.getElementById('deptid').value;
        var deptid= tokenize(dept,'%')[0];
            if(window.XMLHttpRequest) {  //非IE浏览器，用xmlhttprequest对象创建
                request=new XMLHttpRequest();
            } else if(window.ActiveXObject) { //IE浏览器用activexobject对象创建
                request=new ActiveXObject("Microsoft.XMLHttp");
            }
            if(request){
                var url = "<%=response.encodeURL(root+"/jsp/ordersystem/orderinputajax.jsp")%>?conid=" + val+"&dept="+deptid; 
                url=encodeURI(url);
                request.open("GET", encodeURI(url), true); 
                request.onreadystatechange = updatePage;
                request.send(null);
            }else{
                alert("查询该仓库产品结算模式失败！");
            }
        }
        
        function updatePage(){
            if(request.readyState == 4){      //已完成
                if(request.status == 200){ 
                    var text = request.responseText;
                    if(text!=null&&Trim(text)!=""){                
                        var row=Trim(text).split("|");
                        for(var a=0;a<row.length;a++){
                            if(row[a]!="NO"){
                                var b=a+1;
                                document.getElementById("mode"+b).value=row[a];
                                if(row[a]=='<%=GSBaseConstants.BALANCE_MODE1%>'){
                                    document.getElementById("balancemode"+b).innerHTML='<%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE1)%>';
                                }else if(row[a]=='<%=GSBaseConstants.BALANCE_MODE2%>'){
                                     document.getElementById("balancemode"+b).innerHTML='<%=DefineDic.getBalanceMode(GSBaseConstants.BALANCE_MODE2)%>';
                                }
                            }
                        }
                    }
                }else 
                    alert("查询该仓库产品结算模式失败！");
                }
        }
	function changeDeliverAddr(){
		var msg = document.getElementById('deliveraddr').value;
        if(msg!=""){
        var sz = StringTokenize(msg,'%',0,null);
        document.getElementById('linkman_').value=sz[2];
        document.getElementById('linktel_').value=sz[3];
        }
        if(document.getElementById('deliveraddr').selectedIndex==0){
               document.getElementById('linkman_').value="";
            document.getElementById('linktel_').value="";     
        }
	}
	

	
	function submitForm(option){
		if("SA" == option){
			document.all.saveoption.value="SA";
		}
		if("S" == option){
			document.all.saveoption.value="S";
		}
		if("SS" == option){
			document.all.saveoption.value="SS";
		}
		if("SP" == option){
			document.all.saveoption.value="SP";
		}
		//if(ivmanuf()){
		//	if(checkNoneableValue()){
				document.form1.action='<%=response.encodeURL(root+"/A100102.do")%>';
				form1.submit();
		//	}
		//}
	}
	
	function checkNoneableValue(){	
		var currentrownum = document.getElementById('currentrownum').value;
		var deptid = document.getElementById("deptid").value;
		var deliveraddr = document.getElementById("deliveraddr").value;
		var delivermode = document.getElementById("delivermode").value;
		var delivermode_ = document.getElementById("delivermode_").value;
		var balancemode = document.getElementById("balancemode").value;
		var balancemode_ = document.getElementById("balancemode_").value;
		var balancecategory = document.getElementsByName("balancecategory");
		var checkedBC = null;

		for(i=0;i<balancecategory.length;i++){
			if(balancecategory[i].checked){
				checkedBC = balancecategory[i].value;
			}
		}
		
		var linkm = document.getElementById("linkman_").value;
		var linkt = document.getElementById("linktel_").value;
		if(deptid == null || deptid == "") {
			alert("请确认订货单位已经选择");return false;
		}
		if(deliveraddr == null || deliveraddr == ""){
			alert("请确认送货地址已经选择");	return false;
		}		
		if(delivermode == '2' && delivermode_ == ""){
			alert("请确认配送方式已经选择");	return false;
		}
		if(balancemode == '2' && balancemode_ == ""){
			alert("请确认结算方式已经选择");	return false;
		}
		//if(linkm == null || linkm == ""){
		//	alert("请确认联系人已经选择");	return false;
		//}
		//if(linkt == null || linkt == ""){
		//	alert("请确认联系电话已经选择");	return false;
		//}	
		if(checkedBC == null){
			alert("请确认结算分类已经选择");return false;
		}
		
		var sum = 0;
		for(i=1;i<=10;i++)
		{
			var concentricityid = document.getElementById("concentricityid"+i).value;
			var ordercount = document.getElementById("ordercount"+i).value;
			var manufactureid = document.getElementById("manufactureid"+i).value;
			var deliverdate = document.getElementById("deliverdate"+i).value;
			var providerid = document.getElementById("providerid"+i).value;
			
			if(concentricityid != null && concentricityid != "") {
				if(manufactureid == null || manufactureid == ""){
					alert("请确认输入集中编码后已经选定产品");	
					return false;
				}
				if(providerid == null || providerid == ""){
					alert("请确认供应商已经选定");	
					return false;
				}
				if(ordercount == null || ordercount == "")
				{
					alert("请确认订货数量已经输入");	
					return false;
				}
				if(!isFloatNum(ordercount))
				{
					alert("请确认输入的订货数量为数字");	
					return false;
				}
				else
				{
					if(ordercount<=0) 
					{
						alert("订货数量必须大于0");
						return false;
					}
				}
				if(deliverdate == null || deliverdate == "")
				{
					alert("请确认送货日期已经输入");	
					return false;
				}
				
			}
			else{
				resetrow(i);
				sum = sum + i;
			}
		}	
		if(sum == 55){
			alert("申购单必须至少录入一条产品明细");
			return false;
		}		
		return true;
	}
	
	function inputManufacture(){
		var url = "<%=response.encodeURL(root+"/jsp/ordersystem/manufactureinsert.jsp")%>";;
		var returnv = window.open(url,null," edge: sunken ; center: Yes; help: No; resizable: No; status: No; dialogWidth: 840px ; dialogHeight: 720px ; scroll:yes");
	}
	
	function checkManufacture(rownum){
        var deptid=document.getElementById('deptid').value;
        if(deptid == null || deptid == "") {
            alert("请确认订货单位已经选择");return false;
        }
        var deptid= tokenize(deptid,'%')[0];
		var rownumary = tokenize(rownum,',');
		var concentricityid = document.getElementById("concentricityid"+rownum).value;
		if(concentricityid == "" || concentricityid == null)
			return false;
		document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/checkManufacture_yy.jsp")%>?rownum="+rownum+"&concentricityid="+concentricityid+"&deptid="+deptid;
		
		return false;
	}
	
	function checkManufacture2(rownum){
        var deptid=document.getElementById('deptid').value;
        if(deptid == null || deptid == "") {
            alert("请确认订货单位已经选择");return false;
        }
        var deptid= tokenize(deptid,'%')[0];
		var rownumary = tokenize(rownum,',');
		var temp = "";
		//从本页取得集中编码
		for(i=0;i<rownumary.length;i++){
			if(rownumary[i] != null && rownumary[i] != "" ){
				var concentricityid = document.getElementById("concentricityid"+rownumary[i]).value;
				temp = temp + concentricityid + ",";
			}
		}
		document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/checkManufacture_yy2.jsp")%>?rownum="+rownumary+"&concentricityid="+temp+"&deptid="+deptid;
		
		return false;
	}
	
	function inputNewManufacture(){
		document.form1.action='/A100103';
		form1.submit();
	}
	
	function selectManufacture(index){
    var deptid=document.getElementById('deptid').value;
        if(deptid == null || deptid == "") {
            alert("请确认订货单位已经选择");return false;
        }
        var deptid= tokenize(deptid,'%')[0];
        if(deptid.length==8||deptid.length==10){
        	
		document.getElementById('currentrownum').value = index;
		var url="<%=response.encodeURL(root+"/A100199.do")%>";
		//2006-8-9 根据要求修正代码
		//var returnv = window.open(url,null," center=Yes, help=No, resizable=Yes, status=No, width=960px, height=680px, scrollbars=yes");		
		window.open(url,null," center=Yes, help=No, resizable=Yes, status=Yes, width=960px, height=680px, scrollbars=yes");		
        }else{
        	alert("请确认订货单位是具体仓库");
        	keydown2("deptid");
        }
        }

	function createOrderCode(){
		alert("检查是否必输项都输入了");
		//document.all('iframe1').src="<%=response.encodeURL(root+"/jsp/iframe/createorderid.jsp")%>";
		return false;
	}
	
	function jsfschange(){
		var val = document.getElementById('balancemode');
		for(var i=0; i<val.options.length; i++) {
			if(val.options[i].selected && val.options[i].value == "205") {
				if(confirm('是否确认手工输入结算方式?')){
					document.getElementById('balancemode_').style.display='';
					document.getElementById('balancemode').style.display='none';
				}else{
					alert("请重新选择结算方式");
					val.options[0].selected = true;
				}
			}
		}
	}

	function psfschange(){
		var val = document.getElementById('delivermode');
		for(var i=0; i<val.options.length; i++) {
			if(val.options[i].selected && val.options[i].value == "104") {
				if(confirm('是否确认手工输入配送方式?')){
					document.getElementById('delivermode_').style.display='';
					document.getElementById('delivermode').style.display='none';
				}else{
					alert("请重新选择配送方式");
					val.options[0].selected = true;
				}
			}
		}
	}	
	
	function checkconcentricityid(index)
	{
		if  (event.keyCode==13)
		{  
			var deptid=document.getElementById('deptid').value;
	        if(deptid == null || deptid == "") {
	            alert("请确认订货单位已经选择");return false;
	        }
	        var deptid= tokenize(deptid,'%')[0];
	        if(deptid.length==8||deptid.length==10){
	        	
	        	  
	        	
				if (checkiscontentricityidexist(index))
				{
					checkManufacture(index);
					keydown2("providerid"+index);
				}
				else
				{
					keydown2("ordercount"+index);
				}
	        }else{
	        	alert("请确认订货单位是具体仓库");
	        	keydown2("deptid");
	        }
	        
	      

		}		
	}
	
 
	
	 
	
	function checkiscontentricityidexist(index){
		var value = document.getElementById('concentricityid'+index).value;
		for(i=1;i<=10;i++){
			var val = document.getElementById('concentricityid'+i).value;
			if(value == val && index != i && value !=''){
				alert("集中编码输入重复！");
				document.getElementById('concentricityid'+index).value="";
				return false;
			}
		}
		<%
			LoginContext context=(LoginContext) request.getSession().getAttribute(GSBaseConstants.LOGIN);
			String warehouseCode = context.getLoginWarehouseCode();
			if(!warehouseCode.equals("00000400")&&!warehouseCode.equals("0000040000")&&!warehouseCode.equals("0000040001")){
		   		%>
		   			if(value.length>=16){
						alert("集中编码不能输入16位产品！");
						document.getElementById('concentricityid'+index).value="";
						return false;
					}
		   		<%
			}
		%>
		return true;
	}
	
	function ivmanuf(){
		
		for(i=1;i<=10;i++){
			var v1 = document.getElementById('concentricityid'+i).value;
			if(v1 == null || v1.length == 0) continue; 
			for(j=1;j<=10;j++){	
				if(j!=i){
					var v2 = document.getElementById('concentricityid'+j).value;
					if(v1 == v2){
						alert("集中编码输入不正确！");
						return false;
					}
				}
			}
		}
		return true;
	}
	
	function setEnable(){
	  form1.deptid.value="";
	 // changeDeliverAddrByDept();
	 // form1.deliveraddr.value="";	  
	 form1.deptid.focus();
	}
	
	
	function changeManufacture(rownum){
	   var name=document.getElementById("manufacturename"+rownum).innerText;
		var aaa = document.getElementById("providerid"+rownum).options;
		var selected = 0;
		for(i=0;i<aaa.length;i++){
			if(aaa[i].selected == true){
				selected = i;
			}
		}
		if(selected == 0) {
			document.getElementById("referenceprice"+rownum).innerHTML="";
		}
		var pricebuffer = document.getElementById("pricebuffer"+rownum).value;
		var a1 = tokenize(pricebuffer,"|");
		for(i=0;i<a1.length;i++){
			var a2 = tokenize(a1[i],":");
			if(selected == i+1){
			     
				<%
				if (GSSystemConfigurator.getParam("gs.SetManufactureCode13").equalsIgnoreCase("true"))
				{
				%>
					document.getElementById("concentricityid"+rownum).value = a2[2];
					document.getElementById("manufactureid"+rownum).value = a2[3];
                    
				<%
				}
				%>	
                document.getElementById("manufacturename"+rownum).innerHTML="<div align='center' class='txt_content'><a href='<%=response.encodeURL(root+"/A110104.do")%>?concentricityId="+a2[2]+"' target='_blank'>"+name+"</a></div>";
				document.getElementById("referenceprice"+rownum).innerHTML = a2[1];
				document.getElementById("balancemode"+rownum).innerText=a2[5];
                document.getElementById("mode"+rownum).value=a2[4];
				// add by Jackey start
				
				//计算合计 
				getMoney(rownum);
				
				// add by Jackey end
				return ;
			}
		}
		
		// add by Jackey start
		
		//计算合计
		getMoney(rownum);
		
		// add by Jackey end
	
	}
	
	function showmm(rownumary){
		checkManufacture2(rownumary);
	}
	
	function showMsg(balancecategoryno)
	{
	<%
		for(int bcs = 0;bcs < bcList.size();bcs++){
			GSBalanceCategoryBean bcBean = (GSBalanceCategoryBean)bcList.get(bcs);
	%>
			if(<%=bcBean.getGs_balance_category_no()%> == balancecategoryno){
				document.getElementById("bcName").value = '<%=bcBean.getGs_balance_category_name()%>';
			}
	<%		
		}
	%>
	}

	function showCreateDate(val)
	{
		document.getElementById("createdate_").value = val;
	}
	
</script>
<style type="text/css">
<!--
.mtxt_black {
	FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #000000
}
-->
</style>
<body BGCOLOR="#f2f2f2" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="setEnable();">
<input type='hidden' name='currmenu' value='1001'>
<center>

<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td height="20"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr height="20">
          <td height="20" width="2" class="mtxt_black">&nbsp;</td>
          <td height="30" width="558" class="mtxt_black" >录入申购单</td>
		<%
			LoginContext operatorBean = (LoginContext)session.getAttribute(GSBaseConstants.LOGIN);
			String userid = operatorBean.getUser().getCode();
			String password = operatorBean.getUser().getPassword();
		%>
          <td height="30" width="200" font color='red'>
                       
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="bg_line" height="2"></td>
  </tr>
</table>

<br>


<form name="form1" id="form1" method="post"  style="visibility: visible;">
<input type='hidden' name='saveoption' value=''>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
        <td> 
            <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                <tbody> 
                <tr class="bg_column" height=20> 
                    	<td align=middle colspan="11">申购单总体信息</td>
                </tr>
                <tr class="bg_row_odd" height=20> 
                	<td class=top align=middle width='20%' id='aaa'>
                	    <div align="center" class="txt_content">申购单编号</div>
                	</td>
                    <td class=top align=center id='bbb'> 
                        <div align="left" class="txt_content" style='display:none'> 
						<input type='text' id='orderid' name='orderid' size='9' maxlength='9'>
						</div>
						<div align=left class="txt_content" ><font color=#00309E">系统自动生成</font></div>
                    </td>
                    <td class=top align=middle colspan=4> 
                    <%
                    //有初审和复审的才显示直接审批通过
                    if("true".equals(request.getAttribute("AUDITNEED")))
                    {%>
                    	<input type='hidden' id='isshowcheckbox' value='T'>
                        <div align="center" class="txt_content"><input type='checkbox' id='isreviewneeded' name='isreviewneeded' checked >直接审批通过 </div>
                    <%}else{%>
                    	<input type='hidden' id='isshowcheckbox' value='F'>
                    	<div align="center" class="txt_content" style='visibility:hidden'><input type='checkbox' id='isreviewneeded' name='isreviewneeded' >直接审批通过 </div>
                    <%}%>
                    </td>
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">订货单位</div>
                    </td>
                    <td class=top align=center> 
                        <div align='left' class='txt_content'> 
                        	<select id='deptid' name='deptid' onChange='changeDeliverAddrByDept();' onKeyDown="keydown2('delivermode')">
                        		<option value='' selected>请选择..</option>
                      <%
                         for(int i=0;i<ary.size();i++){ 
                             GSWareHouseBean tmp=(GSWareHouseBean)ary.get(i);
                        %>
                          <option value="<%=tmp.getCode()+"%"+tmp.getAddress()+"%"+tmp.getContact_person()+"%"+tmp.getContack_tel()+"%" %>"><%=tmp.getName() %></option>
                          <%}%>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=left> 
	                    <div align="center" class="txt_content">配送方式</div>
	                </td>
                    <td class=top align=middle > 
                        <div align='left' class='txt_content'> 
                        	<select id='delivermode' name='delivermode' onchange="psfschange();" onKeyDown="keydown2('deliveraddr')">
                        		<!--原
                        		<option value='1'>送货上门</option>
                        		<option value='2'>其他</option>
                        		-->
                        		<%
                        		//新修改
                        		for (int i=0;i<deliverModeList.size();i++)
                        		{
                        			com.hitrust.gs.bean.GSDictionaryBean dictionary = (com.hitrust.gs.bean.GSDictionaryBean) deliverModeList.get(i);
                        		%>	
                        			<option value="<%=dictionary.getId()%>"><%=dictionary.getName()%></option>
                        		<%	
                        		}
                        		%>
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
	                    <div align='left' class='txt_content' > 
	                        <input type="text" id='delivermode_' name='delivermode_' size="8" value='' style='display:none'>
	                    </div>                        
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content"  style="display:none;">结算方式</div>
	                </td>
                    <td class=top align=middle > 
                        <div align='left' class='txt_content' style="display:none;"> 
                        	<select id='balancemode' name='balancemode' onchange="jsfschange();" onKeyDown="keydown2('deliveraddr')" style="width:160">
                        		<%
                        		//新修改
                        		for (int i=0;i<balanceModeList.size();i++)
                        		{
                        			com.hitrust.gs.bean.GSDictionaryBean dictionary = (com.hitrust.gs.bean.GSDictionaryBean) balanceModeList.get(i);
                        		%>	
                        			<option value="<%=dictionary.getId()%>"><%=dictionary.getName()%></option>
                        		<%	
                        		}
                        		%>                        		
                        	</select><font color='red'>&nbsp;*</font>
                        </div>
	                    <div align='left' class='txt_content' > 
	                        <input type="text" id='balancemode_' name='balancemode_' size="8" value='' style='display:none'>
	                    </div>
                    </td>

                </tr>
                                
                <tr class="bg_row_odd" height=20> 
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">送货地址</div>
	                </td>
                    <td class=top align=middle> 
                        <div align='left' class='txt_content'> 
                        <select id='deliveraddr' name='deliveraddr' onKeyDown="keydown2('linkman_')" onChange='changeDeliverAddr();'>
                                <option value='' selected>请选择..</option>
                      <%
                         for(int i=0;i<ary.size();i++){ 
                             GSWareHouseBean tmp=(GSWareHouseBean)ary.get(i);
                             if(tmp.getAddress()!=null&&!"".equals(tmp.getAddress())){
                            	String[] str=tmp.getAddress().split(";");
                            	if(str.length>1){
                            		for(int j=0;j<str.length;j++){
                            		%> 
                            	 <option value="<%=tmp.getCode()+"%"+str[j]+"%"+tmp.getContact_person()+"%"+tmp.getContack_tel()+"%" %>"><%=str[j]%></option>
                            	<%}}else{
                        %>
                          <option value="<%=tmp.getCode()+"%"+tmp.getAddress()+"%"+tmp.getContact_person()+"%"+tmp.getContack_tel()+"%" %>"><%=tmp.getAddress() %></option>
                          <%}}}%>
                            </select><font color='red'>&nbsp;*</font>
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">联系人</div>
	                </td>
                    
                    <td class=top align=middle nowrap id='linkman'> 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='linkman_' size='8' name='linkman_' value='' onKeyDown='keydown2("linktel_");'>
                        </div>
                    </td>
	                <td class=top align=middle> 
	                    <div align="center" class="txt_content">联系电话</div>
	                </td>
                    
                    <td class=top align=middle nowrap id='linktel'> 
                        <div align='left' class='txt_content'> 
                        	<input type='text' id='linktel_' size='13' name='linktel_' value='' onKeyDown='keydown2("balancecategory");'>
                        </div>
                    </td>                
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">结算分类</div>
                    </td>
                    <td class=top align=middle colspan='3'> 
                        <div align="left" class="txt_content"> 
                        <input type='hidden' name='bcName'>
                        <% 
                        	
                        	if(bcList == null){
                        		out.print("<input type=radio name='balancecategory' value='0' checked onKeyDown='keydown2(\"Textarea1\");'>零部件&nbsp;");
                        	}else{
                            	for(int bcsize = 0;bcsize <bcList.size();bcsize++)
                            	{
                            		GSBalanceCategoryBean bcBean = (GSBalanceCategoryBean)bcList.get(bcsize);
                            		if (bcList.size() == 1)
	                            		out.print("<input type=radio onclick='showMsg("+bcBean.getGs_balance_category_no()+")' name='balancecategory' value="+bcBean.getGs_balance_category_no()+" checked onKeyDown='keydown2(\"Textarea1\");'>"+bcBean.getGs_balance_category_name()+"&nbsp;");
	                            	else
	                            		out.print("<input type=radio onclick='showMsg("+bcBean.getGs_balance_category_no()+")' name='balancecategory' value="+bcBean.getGs_balance_category_no()+" onKeyDown='keydown2(\"Textarea1\");'>"+bcBean.getGs_balance_category_name()+"&nbsp;");
                            	}
                        	}
                        %>
                        </div>
                    </td>
		                <td class=top align=middle> 
		                    <div align="center" class="txt_content"></div>
		                </td>
	                    
	                    <td class=top align=middle nowrap id='createdate_change'> 
	                        <div align='left' class='txt_content'><input type='hidden'id='isChangeFalse' name='isChange' value='false'></div>
	                    </td>                   
                </tr>
                
                <tr class="bg_row_odd" height=20> 
                    <td class=top align=middle> 
                        <div align="center" class="txt_content">备注</div>
                    </td>
                    <td class=top align=middle colspan='5'> 
                        <div align="left" class="txt_content"> 
                        <textarea id="Textarea1" style="WIDTH: 100%; HEIGHT: 50px" name="notes" onKeyDown='keydown2("concentricityid1")'></textarea>
                        </div>
                    </td>
                </tr>
                
                </tbody> 
            </table>
        </td>
    </tr>
</table>

<center>




    <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">
    	<input type='hidden' id='currentrownum' name='currentrownum' value='1'>
        <tr> 
            <td> 
                <table class=bg_table id=tableId	cellspacing=1 cellpadding=2 width=100% align=center border=0>
                    <tbody> 
                    <tr class="bg_column" height=20> 
                    	<td align=middle colspan="15">申购单产品输入</td>
	                </tr>
	                
	                <tr class="bg_column" height=20> 
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 集中编码<font color='red'>&nbsp;*</font></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 产品名称</div>
                        </td>                        
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 规格</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 型号</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 品牌</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 质保期</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 供应商</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 价格（元）</div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 订货数量<font color='red'>&nbsp;*</font></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 总价（元）</div>
                        </td>                        
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 单位</div>
                        </td>                        
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 送货日期<font color='red'>&nbsp;*</font></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 送货时间<font color='red'>&nbsp;*</font></div>
                        </td>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 结算模式</div>
                        </td>
                    </tr>


<!--第一行-->
                    <tr id='tr1' class="bg_row_even" height=20 > 
					<input type='hidden' id='manufactureunitprice1' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(1);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid1' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(1);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(1);'>
								<input type='hidden' id='manufactureid1' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_1' >
								<input type='hidden' id='manufacturespec_1' >
								<input type='hidden' id='manufacturetype_1' >
								<input type='hidden' id='manufacturebrand_1' >
								<input type='hidden' id='manufactureunitprice_1' >
								<input type='hidden' id='manufacturequantunit_1' >
								<input type='hidden' id='period_1' >							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename1'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec1" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>
                            <div align="center" id="type1" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand1" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period1" class="txt_content"> 
							</div>
                        </td>                        
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid1' name='providerid' onChange='changeManufacture(1)' onKeyDown="keydown2('ordercount1')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>

						<!--参考价格-->
						<input type="hidden" id='pricebuffer1' value='' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice1" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text"  id='ordercount1' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(1,'deliverdate1')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer1' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money1" class="txt_content"> 
							</div>
                        </td>                        
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit1" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate1' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime1')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime1' name='delivertime' onKeyDown="keydown2('concentricityid2')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode1" class="txt_content"> 
                            </div><input type="hidden" id="mode1" name="mode">
                        </td>
                    </tr>



<!--第二行-->
                    <tr id='tr2' class="bg_row_odd" height=20 > 
					<input type='hidden' id='manufactureunitprice2' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(2);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid2' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(2);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(2);'>
								<input type='hidden' id='manufactureid2' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_2' >
								<input type='hidden' id='manufacturespec_2' >
								<input type='hidden' id='manufacturetype_2' >
								<input type='hidden' id='manufacturebrand_2' >
								<input type='hidden' id='manufactureunitprice_2' >
								<input type='hidden' id='manufacturequantunit_2' >
								<input type='hidden' id='period_2' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename2'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec2" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type2" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand2" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period2" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid2' name='providerid' onChange='changeManufacture(2)' onKeyDown="keydown2('ordercount2')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>

                        <!--参考价格-->
						<input type="hidden" id='pricebuffer2' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice2" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount2' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(2,'deliverdate2')"
	                           	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer2' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money2" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit2" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate2' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime2')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime2' name='delivertime' onKeyDown="keydown2('concentricityid3')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode2" class="txt_content"> 
                            </div><input type="hidden" id="mode2" name="mode">
                        </td>

                    </tr>

<!--第三行-->
                    <tr id='tr3' class="bg_row_even" height=20 > 
					<input type='hidden' id='manufactureunitprice3' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(3);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid3' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(3);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(3);'>
								<input type='hidden' id='manufactureid3' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_3' >
								<input type='hidden' id='manufacturespec_3' >
								<input type='hidden' id='manufacturetype_3' >
								<input type='hidden' id='manufacturebrand_3' >
								<input type='hidden' id='manufactureunitprice_3' >
								<input type='hidden' id='manufacturequantunit_3' >
								<input type='hidden' id='period_3' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename3'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec3" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type3" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand3" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period3" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid3' name='providerid' onChange='changeManufacture(3)' onKeyDown="keydown2('ordercount3')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>

                        <!--参考价格-->
						<input type="hidden" id='pricebuffer3' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice3" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount3' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(3,'deliverdate3')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer3' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money3" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit3" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate3' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime3')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime3' name='delivertime' onKeyDown="keydown2('concentricityid4')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode3" class="txt_content"> 
                            </div><input type="hidden" id="mode3" name="mode">
                        </td>

                    </tr>

<!--第四行-->
                    <tr id='tr4' class="bg_row_odd" height=20 > 
					<input type='hidden' id='manufactureunitprice4' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(4);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid4' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(4);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(4);'>
								<input type='hidden' id='manufactureid4' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_4' >
								<input type='hidden' id='manufacturespec_4' >
								<input type='hidden' id='manufacturetype_4' >
								<input type='hidden' id='manufacturebrand_4' >
								<input type='hidden' id='manufactureunitprice_4' >
								<input type='hidden' id='manufacturequantunit_4' >
								<input type='hidden' id='period_4' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename4'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec4" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type4" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand4" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period4" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid4' name='providerid' onChange='changeManufacture(4)' onKeyDown="keydown2('ordercount4')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer4' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice4" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount4' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(4,'deliverdate4')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer4' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money4" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit4" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate4' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime4')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime4' name='delivertime' onKeyDown="keydown2('concentricityid5')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode4" class="txt_content"> 
                            </div><input type="hidden" id="mode4" name="mode">
                        </td>
                    </tr>

<!--第五行-->
                    <tr id='tr5' class="bg_row_even" height=20 > 
					<input type='hidden' id='manufactureunitprice5' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(5);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid5' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(5);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(5);'>
								<input type='hidden' id='manufactureid5' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_5' >
								<input type='hidden' id='manufacturespec_5' >
								<input type='hidden' id='manufacturetype_5' >
								<input type='hidden' id='manufacturebrand_5' >
								<input type='hidden' id='manufactureunitprice_5' >
								<input type='hidden' id='manufacturequantunit_5' >
								<input type='hidden' id='period_5' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename5'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec5" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type5" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand5" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period5" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid5' name='providerid' onChange='changeManufacture(5)' onKeyDown="keydown2('ordercount5')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer5' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice5" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount5' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(5,'deliverdate5')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer5' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money5" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit5" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate5' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime5')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime5' name='delivertime' onKeyDown="keydown2('concentricityid6')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode5" class="txt_content"> 
                            </div><input type="hidden" id="mode5" name="mode">
                        </td>

                    </tr>

<!--第六行-->
                    <tr id='tr6' class="bg_row_odd" height=20 > 
					<input type='hidden' id='manufactureunitprice6' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(6);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid6' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(6);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(6);'>
								<input type='hidden' id='manufactureid6' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_6' >
								<input type='hidden' id='manufacturespec_6' >
								<input type='hidden' id='manufacturetype_6' >
								<input type='hidden' id='manufacturebrand_6' >
								<input type='hidden' id='manufactureunitprice_6' >
								<input type='hidden' id='manufacturequantunit_6' >
								<input type='hidden' id='period_6' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename6'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec6" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type6" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand6" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period6" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid6' name='providerid' onChange='changeManufacture(6)' onKeyDown="keydown2('ordercount6')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer6' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice6" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount6' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(6,'deliverdate6')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer6' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money6" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit6" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate6' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime6')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime6' name='delivertime' onKeyDown="keydown2('concentricityid7')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode6" class="txt_content"> 
                            </div><input type="hidden" id="mode6" name="mode">
                        </td>

                    </tr>

<!--第七行-->
                    <tr id='tr7' class="bg_row_even" height=20 > 
					<input type='hidden' id='manufactureunitprice7' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(7);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid7' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(7);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(7);'>
								<input type='hidden' id='manufactureid7' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_7' >
								<input type='hidden' id='manufacturespec_7' >
								<input type='hidden' id='manufacturetype_7' >
								<input type='hidden' id='manufacturebrand_7' >
								<input type='hidden' id='manufactureunitprice_7' >
								<input type='hidden' id='manufacturequantunit_7' >
								<input type='hidden' id='period_7' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename7'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec7" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type7" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand7" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period7" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid7' name='providerid' onChange='changeManufacture(7)' onKeyDown="keydown2('ordercount7')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer7' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice7" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 

                            	<input type="text" id='ordercount7' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(7,'deliverdate7')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer7' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money7" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit7" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate7' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime7')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime7' name='delivertime' onKeyDown="keydown2('concentricityid8')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode7" class="txt_content"> 
                            </div><input type="hidden" id="mode7" name="mode">
                        </td>

                    </tr>

<!--第八行-->
                    <tr id='tr8' class="bg_row_odd" height=20 > 
					<input type='hidden' id='manufactureunitprice8' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(8);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid8' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(8);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(8);'>
								<input type='hidden' id='manufactureid8' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_8' >
								<input type='hidden' id='manufacturespec_8' >
								<input type='hidden' id='manufacturetype_8' >
								<input type='hidden' id='manufacturebrand_8' >
								<input type='hidden' id='manufactureunitprice_8' >
								<input type='hidden' id='manufacturequantunit_8' >
								<input type='hidden' id='period_8' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename8'> 

							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec8" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type8" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand8" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period8" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid8' name='providerid' onChange='changeManufacture(8)' onKeyDown="keydown2('ordercount8')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer8' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice8" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount8' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(8,'deliverdate8')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer8' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money8" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit8" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate8' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime8')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime8' name='delivertime' onKeyDown="keydown2('concentricityid9')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode8" class="txt_content"> 
                            </div><input type="hidden" id="mode8" name="mode">
                        </td>

                    </tr>

<!--第九行-->
                    <tr id='tr9' class="bg_row_even" height=20 > 
					<input type='hidden' id='manufactureunitprice9' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(9);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid9' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(9);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(9);'>
								<input type='hidden' id='manufactureid9' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_9' >
								<input type='hidden' id='manufacturespec_9' >
								<input type='hidden' id='manufacturetype_9' >
								<input type='hidden' id='manufacturebrand_9' >
								<input type='hidden' id='manufactureunitprice_9' >
								<input type='hidden' id='manufacturequantunit_9' >
								<input type='hidden' id='period_9' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename9'> 
							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec9" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type9" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand9" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period9" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid9' name='providerid' onChange='changeManufacture(9)' onKeyDown="keydown2('ordercount9')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer9' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice9" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount9' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(9,'deliverdate9')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer9' value='0' >
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money9" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit9" class="txt_content"> 
							</div>
                        </td>                        
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate9' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime9')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime9' name='delivertime' onKeyDown="keydown2('concentricityid10')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode9" class="txt_content"> 
                            </div><input type="hidden" id="mode9" name="mode">
                        </td>

                    </tr>

<!--第十行-->
                    <tr id='tr10' class="bg_row_odd" height=20 > 

					<input type='hidden' id='manufactureunitprice10' name='manufactureunitprice' value=''>
                        <td class=top align=middle> 
                            <div align="center" class="txt_content">
	                            <input type='button' class="kuang" value='重置' onclick='resetrow(10);'>
                            </div>
                        </td>
                        <!--集中编码-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content"> 
								<input type='text' id='concentricityid10' name='concentricityid' size='16' maxlength='20' onKeyDown='checkconcentricityid(10);'>
							    <input type='button' class="kuang" value='查询' onclick='selectManufacture(10);'>
								<input type='hidden' id='manufactureid10' name='manufactureid' size='7' maxlength='20'>
								<input type='hidden' id='manufacturename_10' >
								<input type='hidden' id='manufacturespec_10' >
								<input type='hidden' id='manufacturetype_10' >
								<input type='hidden' id='manufacturebrand_10' >
								<input type='hidden' id='manufactureunitprice_10' >
								<input type='hidden' id='manufacturequantunit_10' >
								<input type='hidden' id='period_10' >
							</div>
                        </td>
                        <!--产品名称-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" class="txt_content" id='manufacturename10'> 

							</div>
                        </td>
                        <!--规格-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="spec10" class="txt_content"> 
							</div>
                        </td>
                        <!--型号-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="type10" class="txt_content"> 
							</div>
                        </td>
                        <!--品牌-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="brand10" class="txt_content"> 
							</div>
                        </td>
                        <!--质保期-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="period10" class="txt_content"> 
							</div>
                        </td>
                        <!--供应商-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<select id='providerid10' name='providerid' onChange='changeManufacture(10)' onKeyDown="keydown2('ordercount10')">
									<option value=''>---请选择---</option>
                            	</select>
                            </div>
                        </td>
                        <!--参考价格-->
						<input type="hidden" id='pricebuffer10' value='' >                        
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="referenceprice10" class="txt_content"> 
							</div>
                        </td>
                        <!--订货数量-->
                        <td class=top align=middle> 
                            <div align="center" class="txt_content"> 
                            	<input type="text" id='ordercount10' name='ordercount' size="8" maxlength="11" onblur="formatordercount(this)" onKeyDown="keydown3(10,'deliverdate10')"
                            	>
							</div>
                        </td>
                        <!--总价-->
                        <input type="hidden" id='moneybuffer10' value='0' > 
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="money10" class="txt_content"> 
							</div>
                        </td>                         
                        <!--单位-->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="quantunit10" class="txt_content"> 
							</div>
                        </td>
                        <!--送货日期-->
                        <td class=top align=middle nowrap> 
                            <div align="center" class="txt_content">                             	
                            	<input type="text" id='deliverdate10' name='deliverdate' size="12" value='<%=DateUtil.getTomorrow()%>' readonly onfocus="WdatePicker({maxDate:'2100-01-01',startDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" onKeyDown="keydown2('delivertime10')">
                            </div>
                        </td>
                        <!--送货时间-->
                        <td class=top align=middle> 
                            <div align='center' class='txt_content'> 
                            	<select id='delivertime10' name='delivertime' onKeyDown="keydown2('bbbbb')">
                            		<option value='1' <%=!GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>8:00-12:00</option>
                            		<option value='2'>13:00-18:00</option>
                            		<option value='3' <%=GSSystemConfigurator.getProjectVersion().equalsIgnoreCase("SZ") ? "selected" : ""%>>全天</option>
                            	</select>
                            </div>
                        </td>
                        <!-- 结算模式 -->
                        <td class=top align=middle nowrap>                         
                            <div align="center" id="balancemode10" class="txt_content"> 
                            </div><input type="hidden" id="mode10" name="mode">
                        </td>

                    </tr>

<!-- 合计行 -->			
					<tr id='tr11' class="bg_row_odd" height=20 >
						<td class=top align=middle colspan="10" nowrap>                         
                            <div align="right" class="txt_content"> 合计总价（元）：<div>
                        </td>
                        
                    	<td class=top align=middle colspan="5" nowrap>                         
                            <div align="left" class="txt_content" id="totalMoney">&nbsp;0.0000</div>
                        </td>
					</tr>	
											
                    </tbody> 
                </table>
            </td>
        </tr>
    </table>
    <p align="center">  
    </p>
</form>

<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
<!--
		<td width=100% align=middle id="createorderid">
			<input type="image" src="<%=response.encodeURL(root+"/images/button/shengcheng.gif")%>" width="58" height="24" class="box" onclick="createOrderCode();return false;">
		</td>
-->

		<td width=100% align=middle id="submitform">
			<!--input type="button" class="kuang" value="保存并继续申购" onclick="submitForm('SA');return false;"-->
			<!--input type="button" class="kuang" value="保存" onclick="submitForm('S');return false;"-->
			<!-- 20061017 再次禁止运营公司直接向采购网提交申购单 -->
			
            <!--有“提交申购”功能才显示此按钮 type=button 或 hidden -->     
            <%
            //设置是否提交到APEP
				if( GSSystemConfigurator.getParam("gs.SetSubmit").equalsIgnoreCase("1") ) 
				{
            %>
				<!--<input type="<%=("true".equals(request.getAttribute("isCommitExist")))?"button":"hidden"%>" class="kuang" id='aaaaa' value="直接提交" onclick="openconfirm('SS');return false;">-->
			<%
			}else if(GSSystemConfigurator.getParam("gs.SetSubmit").equalsIgnoreCase("2")){
			%>
				<!--<input type="<%=("true".equals(request.getAttribute("isCommitExist")))?"button":"hidden"%>" class="kuang" id='ddddd' value="直接提交到交易平台" onclick="openconfirm('SP');return false;">-->
			<%
			}
			%>
			<input type="button" class="kuang" id='bbbbb' value="保存并继续申购" onclick="openconfirm('SA');return false;">
			<input type="button" class="kuang" id='ccccc' value="保存" onclick="openconfirm('S');return false;">
			
			<input type='hidden' name='middleview'>
		</td>

	<tr>
</table>

<div style="text-align:center;visibility:hidden" id="queding" name="queding">
<!--	   <input type="image" src="images/cx.jpg" width="58" height="24" class="box" onclick="form1.submit()">-->
<input type="button" value="" onClick="form1.submit();" class="kuang" value="完成">
</div>
</center>
<iframe id='iframe1' name="iframe1" src="<%=response.encodeURL(root+"/template.jsp")%>" width="0" height="0" frameborder = "0"></iframe>

<script language='javascript'>
	function formatordercount(obj){
	   obj.value = FormatNum2(obj);
	   getMoneyIndex(obj);
	}
	
	function openconfirm(val){
		if (!judgeStrLen("Textarea1")) return false;
		if(ivmanuf()){
			if(checkNoneableValue()){
				var url="<%=response.encodeURL(root+"/jsp/ordersystem/ordermiddleview.jsp")%>?val="+val+"&delivermode="+document.getElementById('delivermode').value+"&balancemode="+document.getElementById('balancemode').value;
				window.open(url,null," center=Yes, help=No, resizable=Yes, status=Yes, width=960px, height=680px, scrollbars=yes");		
			}
		}
	}
	
	function middleviewsubmit(val){
		if(document.all.middleview.value == "T")
			<!--document.getElementById('aaaaa').disabled=true;-->
			document.getElementById('bbbbb').disabled=true;
			document.getElementById('ccccc').disabled=true;
			submitForm(val);
	}
	
	function keydown2(id){
		if(event.keyCode==13) {
			var obj = document.getElementById(id);
			if (obj.type =="radio")
			{
				obj.checked = true;
			}			
			obj.focus();
		}
	}
	
	
	var ids = 0;
	function keydown3(id,nextid){
		if(event.keyCode==13) {
			 if(window.XMLHttpRequest) {  //非IE浏览器，用xmlhttprequest对象创建
		            request=new XMLHttpRequest();
		        } else if(window.ActiveXObject) { //IE浏览器用activexobject对象创建
		            request=new ActiveXObject("Microsoft.XMLHttp");
		        }
		        if(request){
		        	//集中编码
		        	var proCode= document.getElementById('concentricityid'+id).value;
		        	//订货数量
		        	var proCount= document.getElementById('ordercount'+id).value;
		        	//保留id
		        	ids = id;
		        	//订货单位
		        	var deptid= document.getElementById('deptid').value;
		            var url = "<%=response.encodeURL(root+"/A100113.do")%>?deptid=" + deptid+"&proCount="+proCount+"&proCode="+proCode; 
		            url=encodeURI(url);
		            request.open("GET", encodeURI(url), true); 
		            request.onreadystatechange = valdates;
		            request.send(null);
		        }else{
		            alert("'订货数量'验证失败！");
		        }
		        
		        
		        var obj = document.getElementById(nextid);
				if (obj.type =="radio")
				{
					obj.checked = true;
				}			
				obj.focus();
		}
		
	}
	
	
    function valdates(){
        if(request.readyState == 4){      //已完成
            if(request.status == 200){ 
                var text = request.responseText;
                if(text!="null"&&Trim(text)!=""){  
                	if(!isNaN(text)){ 
                		document.getElementById('ordercount'+ids).value = text;
                		ids = 0;
                	}else{
                		alert(text);
                		document.getElementById('ordercount'+ids).value = "";
                		return false;
                	}
                		
                		               
                }
            }else 
                alert("'订货数量'验证失败！");
            }
    }
</script>
<script language='javascript'>
	function getMoneyIndex(obj)
	{
		var name = obj.name;
		var id = obj.id;
		var index = id.substring(name.length);
		getMoney(index);
	}
	function getMoney(index)
	{
		var ordercount = document.getElementById('ordercount' + index).value;
		var pricebuffer = document.getElementById('referenceprice' + index).innerText;
		if (ordercount == null || ordercount.length == 0 || isNaN(ordercount)) ordercount = 0;
		if (pricebuffer == null || pricebuffer.length == 0 || isNaN(pricebuffer)) pricebuffer = 0;
		var money = ordercount * pricebuffer ;
		if (money == null || money.length == 0 || isNaN(money)) money = 0;
		var obj = document.getElementById('money' + index);
		obj.innerText = money.toFixed(4);
		document.getElementById("moneybuffer" + index).value = money.toFixed(4);
		totalMoney();
	}
	function totalMoney()
	{
		var val = 0;
		var k = 0;
		for(k=1;k<=10;k++)
		{
			var money = document.getElementById('moneybuffer' + k).value;
			if (money == null || money.length == 0 || isNaN(money)) money = 0;
			val = parseFloat(val) + parseFloat(money);
		}
		val = "" + val ;
		if (val == null || val.length == 0 || isNaN(val)) val = 0;
		var obj = document.getElementById('totalMoney');
		obj.value = val;
		val = FormatNum2(obj);
		obj.innerText = " " + val.toFixed(4) + " ";
		return true;
	}
	function judgeStrLen(name)
	{
		var str = document.getElementById(name).value;
		if (str == null || str.length == 0) return true;
		if (StrLen(str)><%=memoLen%>)
		{
			alert("备注长度不能超过<%=memoLen/2%>个汉字！");
			return false;
		}
		return true;
	}
</script>
</body>
</html>